import request from '@/utils/request';
import type {
  UserPageDTO,
  UserSaveDTO,
  UserUpdDTO,
  Page,
  User,
  BaseResponse
} from '@/types';

// 用户分页查询
export const getUserPage = (data :UserPageDTO) => {
  return request.post<BaseResponse<Page<User>>>('/user/page', data);
};

// 保存用户
export const saveUser = (data :UserSaveDTO) => {
  return request.post<BaseResponse<boolean>>('/user/save', data);
};

// 更新用户
export const updateUser = (data :UserUpdDTO) => {
  return request.post<BaseResponse<boolean>>('/user/update', data);
};
